package com.blog.controller;

import com.blog.service.DataViewService;
import com.blog.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DataViewController {

    private DataViewService dataViewService;

    @Autowired
    public DataViewController(DataViewService dataViewService) {
        this.dataViewService = dataViewService;
    }

    //统计
    @GetMapping("/dataView")
    public Result dataView(){
        return Result.ok(dataViewService.getData());
    }


}
